package com.stars.home.base

import androidx.databinding.ViewDataBinding
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.stars.home.R
import com.stars.home.activity.LoginActivity
import com.stars.home.activity.OneLoginActivity
import com.stars.home.model.User
import com.trailer.base.base.BRFragment
import com.trailer.base.base.BRViewModel
import com.trailer.base.inter.IUser
import com.trailer.base.utils.UiSwitch

/**
 * Mine Base ReyclerView Activity
 *
 * @param <VM>
 * @param <A>
 * @param <B>
</B></A></VM> */
abstract class MBRFragment<VM : BRViewModel<*>, A : BaseQuickAdapter<*, out BaseViewHolder>, B : ViewDataBinding> : BRFragment<VM, A, B>() {

    override fun toLogin() {
        super.toLogin()
        UiSwitch.single(context(), OneLoginActivity::class.java)
//        toast(R.string.please_login)
    }

    override fun user(): IUser? {
        return User.get()
    }


    override fun bgColor(): Int {
        return R.color.white
    }

    override fun titleColor(): Int {
        return R.color.black
    }

    override fun rightTextColor(): Int {
        return R.color.black
    }

    override fun backDrawable(): Int {
        return R.drawable.ic_back_black
    }

}
